<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <%- include common/meta %>
</head>
<body class="bg-gray js-body">
<nav class="navbar  nav-bg navbar-fixed-top  bottom-border" role="navigation">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse"
                data-target="#example-navbar-collapse">
            <span class="sr-only">切换导航</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="#"><%=session.site.name %></a>
    </div>
    <div class="collapse navbar-collapse" id="example-navbar-collapse">
        <ul class="nav navbar-nav">
            <li >
                <a href="/" title="首页" data-toggle="tooltip" data-placement="bottom" class="color-white js-home-menu <%if((!locals.currentMenu)||currentMenu=="home"){%>current-menu<%}%>">
                    <i class="glyphicon glyphicon-home"></i> &nbsp;首页
                </a>
            </li>
            <li role="presentation" class="dropdown js-category">
                <a title="分类查看"  data-placement="bottom" class="dropdown-toggle color-white js-category-content <%if(locals.currentMenu&&currentMenu=="category"){%>current-menu<%}%>" data-toggle="dropdown" href="javascript:void(0);">
                    <i class="glyphicon glyphicon-list"></i> &nbsp;分类查看&nbsp;&nbsp;<i class="glyphicon glyphicon-chevron-down"></i>
                </a>
                <ul class="dropdown-menu l-select js-category-menu" role="menu"> </ul>
            </li>
            <li>
                <a title="我发表的日志" data-toggle="tooltip" data-placement="bottom" href="javascript:void(0);" class="color-white js-my-content-menu <%if(locals.currentMenu&&currentMenu=="mycontent"){%>current-menu<%}%>" >
                    <i class="glyphicon glyphicon-book"></i>&nbsp;我的日志
                </a>
            </li>
           <!-- <li  title="我的评说"><a href="javascript:void(0);" class="color-white js-my-comment-menu" >
                    <i class="glyphicon glyphicon-comment"></i>&nbsp;我的评说
                </a>
            </li>-->
            <li>
                <a title="发表日志" data-toggle="tooltip" data-placement="bottom" href="/content/addPage?view=addContent" class="color-white js-post-log <%if(locals.currentMenu&&currentMenu=="content"){%>current-menu<%}%>">
                    <i class="glyphicon glyphicon-pencil"></i>&nbsp;发表日志
                </a>
            </li>
            <li>
                <a title="公告" data-toggle="tooltip" data-placement="bottom" href="/log?view=log&page=1" class="color-white badge-father js-log <%if(locals.currentMenu&&currentMenu=="log"){%>current-menu<%}%>">
                    &nbsp;<i class="glyphicon glyphicon-volume-up"></i>&nbsp;公告
                    <span class="badge js-log-count"></span>
                </a>
            </li>
            <% if(session.user != null){ %>
            <li>
                <a title="后台管理" data-toggle="tooltip" data-placement="bottom" href="/manager" class="color-white" >
                    <i class="glyphicon glyphicon-user"></i>&nbsp;
                    <%= session.user.realName?session.user.realName:session.user.userName %>
                </a>
            </li>
            <li>
                <a title="退出系统" data-toggle="tooltip" data-placement="bottom" href="javascript:void(0)" class="color-white js-logout-btn" >
                    <i class="glyphicon glyphicon-log-out"></i>&nbsp;退出
                </a>
            </li>

            <% }else{ %>
            <li class="js-login-toggle">
                <a title="老用户登录" data-toggle="tooltip" data-placement="bottom" href="javascript:void(0)" class="js-login-btn color-white">
                    <i class="glyphicon glyphicon-log-in"></i>&nbsp;登录
                </a>
                <a title="后台管理" data-toggle="tooltip" data-placement="bottom" href="/manager" class="color-white" style="display: none;">
                    <i class="glyphicon glyphicon-user"></i>&nbsp;
                    <span class="js-user-name"></span>
                </a>
            </li>
            <li class="js-login-toggle">
                <a title="新用户注册" data-toggle="tooltip" data-placement="bottom" href="javascript:void(0)" class="js-register-btn color-white">
                    <i class="glyphicon glyphicon-registration-mark"></i>&nbsp;注册
                </a>
                <a title="退出系统" data-toggle="tooltip" data-placement="bottom" href="javascript:void(0)" class="color-white js-logout-btn"  style="display: none;">
                    <i class="glyphicon glyphicon-log-out"></i>&nbsp;退出
                </a>
            </li>
            <% } %>
            <li role="presentation" class="dropdown js-search-bar search-bar" style="padding: 0px 10px 0px 10px;">
                <input data-toggle="tooltip" data-placement="bottom"  type="search" data-toggle="dropdown" maxlength="50" class="dropdown-toggle form-control search-input js-search" value="<%if(locals.key){%><%=key%><%}%>" placeholder="回车搜索" />
                <ul class="dropdown-menu l-search-select hide js-search-panel" role="menu"> </ul>
            </li>
        </ul>
    </div>
</nav>
<div class="container l-margin-top-60">
    <article>
